/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jesseenglish.swingftfy.extensions;

import java.awt.Dialog;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.Window;
import javax.swing.JDialog;

/**
 *
 * @author jesse
 */
public class FDialog extends JDialog {

    public FDialog() {
        super();
    }

    public FDialog(Dialog dialog) {
        super(dialog);
    }

    public FDialog(Frame frame) {
        super(frame);
    }

    public FDialog(Window window) {
        super(window);
    }

    public FDialog(Dialog dialog, String string) {
        super(dialog, string);
    }

    public FDialog(Dialog dialog, boolean bln) {
        super(dialog, bln);
    }

    public FDialog(Frame frame, String string) {
        super(frame, string);
    }

    public FDialog(Frame frame, boolean bln) {
        super(frame, bln);
    }

    public FDialog(Window window, ModalityType mt) {
        super(window, mt);
    }

    public FDialog(Window window, String string) {
        super(window, string);
    }

    public FDialog(Dialog dialog, String string, boolean bln) {
        super(dialog, string, bln);
    }

    public FDialog(Frame frame, String string, boolean bln) {
        super(frame, string, bln);
    }

    public FDialog(Window window, String string, ModalityType mt) {
        super(window, string, mt);
    }

    public FDialog(Dialog dialog, String string, boolean bln, GraphicsConfiguration gc) {
        super(dialog, string, bln, gc);
    }

    public FDialog(Frame frame, String string, boolean bln, GraphicsConfiguration gc) {
        super(frame, string, bln, gc);
    }

    public FDialog(Window window, String string, ModalityType mt, GraphicsConfiguration gc) {
        super(window, string, mt, gc);
    }
    
    public void center() {
        this.setLocation(((int)super.getParent().getWidth() / 2) - ((int)this.getSize().getWidth() / 2) + (int)super.getParent().getLocation().getX(),
                         ((int)super.getParent().getHeight() / 2) - ((int)this.getSize().getHeight() / 2) + (int)super.getParent().getLocation().getY());
        
    }
    
}
